Skip to content

refactor: replace rustix::pipe with std::io::pipe#12356

Merged
cakebaker merged 1 commit into
uutils:mainfrom
xtqqczze:io-pipe
May 19, 2026
Merged

refactor: replace rustix::pipe with std::io::pipe#12356
cakebaker merged 1 commit into
uutils:mainfrom
xtqqczze:io-pipe

Conversation

@xtqqczze
Copy link
Copy Markdown
Contributor

@xtqqczze xtqqczze commented May 18, 2026

std::io::pipe provides PipeReader and PipeWriter types, wrappers around the underlying pipe file descriptors/handles that implement the Read and Write traits respectively. This removes the direct rustix dependency while preserving existing behavior.

@oech3

This comment was marked as resolved.

Comment thread fuzz/uufuzz/src/lib.rs Outdated
Comment thread src/uucore/src/lib/features/pipes.rs
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 18, 2026

GNU testsuite comparison:

Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/tail-n0f (passes in this run but fails in the 'main' branch)

@oech3

This comment was marked as resolved.

@xtqqczze

This comment was marked as outdated.

@oech3

This comment was marked as off-topic.

Comment thread fuzz/uufuzz/src/lib.rs
@xtqqczze xtqqczze force-pushed the io-pipe branch 5 times, most recently from f533322 to 70f20be Compare May 18, 2026 14:50
@oech3
Copy link
Copy Markdown
Contributor

oech3 commented May 18, 2026

I noticed that pipe syscall was replaced by pipe2. But it should not hurt.

Comment thread src/uucore/src/lib/features/pipes.rs
Comment thread src/uucore/src/lib/features/pipes.rs Outdated
@xtqqczze xtqqczze marked this pull request as ready for review May 18, 2026 18:11
@oech3
Copy link
Copy Markdown
Contributor

oech3 commented May 19, 2026

I agree with some names of vars are not ideal, but I don't think we need to hurry generating many confliction.
The main purpose of this PR should be migration to std.

@xtqqczze
Copy link
Copy Markdown
Contributor Author

xtqqczze commented May 19, 2026

@oech3 Sorry, I didn’t realize that renaming the variables in 44b9416 would introduce conflicts. I’ve dropped that commit now.

@oech3
Copy link
Copy Markdown
Contributor

oech3 commented May 19, 2026

Thanks.

@oech3
Copy link
Copy Markdown
Contributor

oech3 commented May 19, 2026

error: unused import: std::fs::File

@xtqqczze xtqqczze force-pushed the io-pipe branch 2 times, most recently from d13ff2c to 3aad789 Compare May 19, 2026 01:33
@oech3
Copy link
Copy Markdown
Contributor

oech3 commented May 19, 2026

Any std replacement for https://doc.servo.org/rustix/pipe/constant.PIPE_BUF.html ?

@xtqqczze
Copy link
Copy Markdown
Contributor Author

@cakebaker cakebaker merged commit 57135cb into uutils:main May 19, 2026
169 of 171 checks passed
@cakebaker
Copy link
Copy Markdown
Contributor

Thanks to both of you!

@xtqqczze xtqqczze deleted the io-pipe branch May 19, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants